Appendix LCD is connected at Port 0 of Microcontroller LCDDATA EQU P0 Pin 2.0 is selecting GSM SEL_GSM BIT P2.0 Pin 2.1 is selecting GPS SEL_GPS BIT P2.1 Pin 3.3 is connected to Sensor SENSOR BIT P3.3 Set 4800 BAUD RATE Loop of circuit operation started START: Reading GPS data (latitude and longitude) ACALL READ_GPS Display the observed coordinates ACALL DISPLAY_GPS Initialize GSM ACALL GSM Jump to LOOP3 if sensor does not sense any vibration JNB SENSOR, LOOP3 Jump to SMS_ACCIDENT ACALL SMS_ACCIDENT Clear and reset the previous condition CLR S_RESET SETB S_RESET Jump to START for starting the procedure again LOOP3: SJMP START Set that GPS data is to be displayed DISPLAY_GPS: LCD line 1 is selected for displaying GPS data ACALL LCD_LINE1 | GSM START HERE RAM of GSM modem is cleared ACALL RAM_CLEAR IF THERE IS A NEW MSG DB “AT + CMGL = 0”, CR, LF, 0 Display about New Message DB “NEW MESSAGE.”, 0 Select Text Mode for GSM DB “AT + CMGF = 1”, CR, LF, 0 Select SIM for SMS DB “AT + CPMS = ”, 34, “ME”, 34, CR, LF, 0 Read SMS from Location 1 DB “AT + CMGR = 1”, CR, LF, 0 SMS_ACCIDENT: Define the data “ACCIDENT HAS OCCURED AT” DB “ACCIDENT HAS OCCURED AT”, 0 Jump to LCD_PRINT ACALL LCD_PRINT Display about SMS sending on LCD DB “SENDING SMS1”, 0 Configure GSM to Text mode DB “AT + CMGF = 1”, CR, LF, 0 Enable SMS sending mode of GSM DB “AT + CMGS = ”, 34, “03074013945”, 34, CR, 0 Second SMS is sending DB “SENDING SMS2”, 0 Give command to LCD for display the description about accident LCD_PRINT: POP DPH Command to LCD for Exiting from loop LCD_EXIT: MOV A, #1 |